package stuff;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Repository;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
/**
 *
 * @author Николай
 */
@Repository
public class MockAccountManager implements AccountManager {

    private static final Logger logger = LoggerFactory.getLogger(AccountManager.class);
    
    private Map<String, Account> accounts = new ConcurrentHashMap<String, Account>();

    @Override
    public void addAccount(Account acc) {
        accounts.put(acc.getUserName(), acc);
        logger.info("ADD ACCOUNT " + acc.toString());
    }

    @Override
    public Account getAccount(String userName) {
        logger.info("GET ACCOUNT " + userName);
        return accounts.get(userName);
    }

    @Override
    public Account getAccount(long id) {
        return new Account();
    }
}
